package cn.gson.boot.model.mapper;

import cn.gson.boot.model.pojos.*;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SalesMapper {

    //销售机会分页查询
    public List<Sales> selectSales(@Param("search") String search,
                                   @Param("type") String type,
                                   @Param("empName") String empName);

    //销售机会客户列表
    public List<Kehu> selectKehu(@Param("khsearch") String khsearch,
                                 @Param("empName") String empName);

    //客户联系人查询
    public List<Contacts> selectLxr(@Param("khName") String khName);

    //查询要修改的销售机会
    public List<Sales> selectSalesId(@Param("salessId") Integer salessId);

    //查询签了合同的销售机会不能被删除
    public Hetong selectHt(@Param("salesId") Integer salesId);

    //查询客户的来源
    public List<SalesVo> selectLaiy(@Param("salesMan") String salesMan);

    //查询机会的来源(统计图)
    List<SalesVo> selectPossibility(String salesMan);

    //销售阶段的阶段数量(漏斗)
    public List<SalesVo> stageNum(@Param("salesMan") String salesMan);

    //销售阶段金额
    public List<SalesVo> stageMoney(@Param("salesMan") String salesMan);

    //销售机会预期签单时间(漏斗)
    public  List<SalesVo> selectDate(@Param("salesMan") String salesMan);

    //销售漏斗选择框
    public List<User> selectUser();

    List<SalesVo> selectsDateMonth(String salesMan);
}
